<!-- （张仕琪）【搜索页面的子路由】最热搜索页面 -->
<template>
    <h3 class="title">
        <van-icon name="fire" color="#ee0a24" />
        热门搜索
    </h3>
    <div class="word">
        <van-tag round class="tag" type="primary"  color="#ECF1EF" text-color="#838B8B" size="large" @click="toIndex">首页惊喜福利</van-tag>
        <van-tag round class="tag" type="primary"  color="#ECF1EF" text-color="#838B8B" size="large" @click="(toCategoryshop)">运动后快餐</van-tag>
        <van-tag round class="tag" type="primary"  color="#ECF1EF" text-color="#838B8B" size="large" @click="toIndex">经典小炒</van-tag>
        <van-tag round class="tag" type="primary"  color="#ECF1EF" text-color="#838B8B" size="large" @click="toIndex">冬至</van-tag>
        <van-tag round class="tag" type="primary"  color="#ECF1EF" text-color="#838B8B" size="large" @click="toIndex">舌尖的旅行！异国风味</van-tag>
        <van-tag round class="tag" type="primary"  color="#ECF1EF" text-color="#838B8B" size="large" @click="toIndex">夏日奶茶</van-tag>
        <van-tag round class="tag" type="primary"  color="#ECF1EF" text-color="#838B8B" size="large" @click="toIndex">团圆</van-tag>
        <van-tag round class="tag" type="primary"  color="#ECF1EF" text-color="#838B8B" size="large" @click="toIndex">朋友感动哭了系列</van-tag>

    </div>
</template>

<script setup>
import { useRouter } from "vue-router";
const router = useRouter(); //获取到router 对象，用于编程式跳转导航
function toIndex() {
    router.push("/");
}
function toCategoryshop() {
    router.push("/categoryshop");
}
</script>

<style scoped >
.title {
    margin: 20px 10px;
}

.word {
    width: 85;
    margin: -10px 20px 0 20px;
   
}
.tag{
    margin: 4px 5px 0 2px;
}
</style>